package com.jmars.TS.mapper.db1;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.jmars.TS.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * (SaleReceipt)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-27 12:44:44
 */
@Mapper
@Repository
@DS("master")
public interface WMSInOutMapper {

    /** 删除 **/
    public int deleteInSku ();  // 商品档案 删除
    public int deleteInSkuBarcode ();  // 商品档案 删除
    public int deleteInSkuPosition ();  // 商品档案 删除
    public int deleteInSkuSupply (); // wms获取货位信息 删除
    public int deleteInDCCost (); // 大库成本 删除

    public int deleteInLocation (); // 店铺档案 删除
    public int deleteInSupply (); // 供应商档案 删除
    public int deleteInLine (); // 供应商档案 删除
    public int deleteInWmsStock (); // WMS商品库存表 删除
    public int deleteInInfGoodsMore (); // wms获取商品附加属性 删除
    public int deleteInInfStockPosition (); // wms获取货位信息 删除
    public int deleteInGetWmsStockByPositionList (); // wms获取货位信息 删除

    public int deleteInGetStoreToDcApply (); // 门店退仓库退货申请 删除
    public int deleteInGetDcToSupplierApply (); // 仓库退供应商退货申请 删除
    public int deleteInAsnHeader (); // 收货指令接收-表头 删除
    public int deleteInAsnDetail (); // 收货指令接收-明细表 删除
    public int deleteInSoHeader (); // 发货指令接收-表头 删除
    public int deleteInSoDetail (); // 发货指令接收-明细表 删除



    public int deleteInGetDeptPickStatus ();
    public int deleteInGetStorePickStatus ();
    public int deleteInGetLinePickStatus ();
    public int selectMaxInGetDeptPickStatus();
    public int selectMaxInGetStorePickStatus();
    public int selectMaxInGetLinePickStatus();



    /** 插入 **/
    public int insertInSku (InSku inSku);
    public int insertInSkuBarcode (InSkuBarcode inSkuBarcode);
    public int insertInSkuPosition (InSkuPositon inSkuPositon);
    public int insertInSkuSupply (InSkuSupply inSkuSupply);
    public int insertInDCCost (InDCCost inDCCost);
    public int insertInLocation (InLocation inLocation);
    public int insertInSupply (InSupply inSupply);
    public int insertInLine (InLine inLine);
    public int insertInWmsStock (InWmsStock inWmsStock);
    public int insertInInfGoodsMore (InInfGoodsMore inInfGoodsMore);
    public int insertInInfStockPosition (InInfStockPosition inInfStockPosition);
    public int insertInGetWmsStockByPosition (InGetWmsStockByPosition inGetWmsStockByPosition);

    public int insertInGetStoreToDcApply (InGetStoreToDcApply inGetStoreToDcApply);
    public int insertInGetDcToSupplierApply (InGetDcToSupplierApply inGetDcToSupplierApply);
    public int insertInAsnHeader (InAsnHeader inAsnHeader);
    public int insertInAsnDetail (InAsnDetail inAsnDetail);
    public int insertInSoHeader (InSoHeader inSoHeader);
    public int insertInSoDetail (InSoDetail inSoDetail);
    public int insertInPickInfo (InPickInfo inPickInfo);
    public int insertInOrderPickSts (InOrderPickSts inOrderPickSts);
    public int insertInPickPrintLableInfo (InPickPrintLableInfo inPickPrintLableInfo);

    public int insertInGetDeptPickStatus (InGetDeptPickStatus inGetDeptPickStatus);
    public int insertInGetStorePickStatus (InGetStorePickStatus inGetStorePickStatus);
    public int insertInGetLinePickStatus (InGetLinePickStatus inGetLinePickStatus);


    public int batchInsertInSoDetail (List<InSoDetail> inSoDetails);


    public int existInAsnHeader(InAsnHeader inAsnHeader);
    public int existInSoHeader(InSoHeader inSoHeader);
    public int existInGetStoreToDcApply(InGetStoreToDcApply inGetStoreToDcApply);
    public int existInGetDcToSupplierApply(InGetDcToSupplierApply inGetDcToSupplierApply);
    public int existInOrderPickSts(InOrderPickSts inOrderPickSts);
    public int updateInAsnHeader(InAsnHeader inAsnHeader);    // 更新传递标志
    public int updateInSoHeader(InSoHeader inSoHeader);    // 更新传递标志

    public int updateSoShipWaveStatus(String wave_no);    // 更新拣货单 拣货状态
    public int updateSoPushFlag2(String so_no);    // 更新拣货单 拣货状态
    public int updateSoPushFlag3(String so_no);    // 更新拣货单 拣货状态
    public int updateNowamount(InGetDcToSupplierApply item);    // 更新传递标志



    public List<OutAsn> selectOutAsnList();
    public List<OutSo> selectOutSoList();
    public List<OutAsn2> selectOutAsn2List();
    public List<OutSo2> selectOutSo2List();
    public List<OutInv> selectOutInvList();
    public List<OutInv2> selectOutInv2List();
    public List<OutInv2BS> selectOutInv2BSList();
    public List<OutPickerRecord> selectOutPickerRecordList();
    public List<OutWmsGoods> selectOutWmsGoodsList();
    public List<OutDistributionOrder> selectOutDistributionOrderList();

    public List<GetBilPickInfoRequest> selectBilPickInfoList();
    public List<GetOrderPickStsRequest> selectOrderPickStsList();
    public List<GetPickPrintLableInfoRequest> selectPickPrintLableInfoList();
    public List<InGetDcToSupplierApply> selectSupplyInDcToSupplierApplyList();  // 获取供应商编码



    public int updateOutAsn (OutAsn outAsn);    // 更新传递标志
    public int updateOutSo (OutSo outSo);       // 更新传递标志
    public int updateOutAsn2 (OutAsn2 outAsn2);    // 更新传递标志
    public int updateOutSo2 (OutSo2 outSo2);       // 更新传递标志
    public int updateOutInv2 (OutInv2 outInv2); // 更新传递标志
    public int updateOutInv2BS (OutInv2BS outInv2BS); // 更新传递标志
    public int updateOutPickerRecord (OutPickerRecord outPickerRecord); // 更新传递标志
    public int updateOutWmsGoods (OutWmsGoods outWmsGoods); // 更新传递标志
    public int updateOutDistributionOrder (OutDistributionOrder outDistributionOrder); // 更新传递标志


    /** 调用无参数的存储过程
     * @param params**/
    public String callSpSqlInSku(HashMap<String, Object> params);         // 商品档案
    public String callSpSqlInLocation(HashMap<String, Object> params);    // 店铺档案
    public String callSpSqlInSupply(HashMap<String, Object> params);      // 供应商档案
    public String callSpSqlInLine(HashMap<String, Object> params);        // 路线档案
    public String callSpSqlInWmsStock(HashMap<String, Object> params);         // 商品档案
    public String call_SP_SQL_IN_INF_GOODS_MORE(HashMap<String, Object> params);         // wms获取商品附加属性
    public String call_SP_SQL_IN_INF_STOCK_POSITION(HashMap<String, Object> params);         //  wms获取货位信息
    public String call_SP_SQL_IN_GetWmsStockByPosition(HashMap<String, Object> params);         //  4.23 查询库存货位

    public String callSpSqlInAsn(HashMap<String, Object> params);         // 收货指令接收
    public String callSpSqlInSo(HashMap<String, Object> params);          // 发货指令接收
    public String callSpSqlInGetStoreToDcApply(HashMap<String, Object> params);          // 退货-门店退大仓
    public String callSpSqlInGetDcToSupplierApply(HashMap<String, Object> params);          // 退货-大仓-供应商
    public String callSpSqlInvReturnSku(HashMap<String, Object> params);          // 退货-大仓-供应商


    public String callSpSqlOutAsn(HashMap<String, Object> params);        // 收货单回传
    public String callSpSqlOutSo(HashMap<String, Object> params);         // 发货单回传
    public String callSpSqlOutAsn2(HashMap<String, Object> params);        // 退货单回传
    public String callSpSqlOutSo2(HashMap<String, Object> params);         // 退货单回传
    public String callSpSqlOutInv(HashMap<String, Object> params);        // 每日库存回传
    public String callSpSqlOutInv2(HashMap<String, Object> params);       // 库存异动回传
    public String callSpSqlOutInv2BS(HashMap<String, Object> params);       // 库存异动回传
    public String callSpSqlOutPickerRecord(HashMap<String, Object> params);       // 拣货人记录回传
    //public String callSpSqlOutWmsGoods(HashMap<String, Object> params);       // 拣货人记录回传(不用了)
    public String call_SP_SQL_IN_ORDER_PCIK_STS_wms(HashMap<String, Object> params);       // 整件打印后计算库存(不用了)
    public String call_SP_SQL_IN_ORDER_PCIK_STS(HashMap<String, Object> params);       // 【系统拣货确认数据】
    public String call_SP_SQL_PICKING_LABLE(HashMap<String, Object> params);       // 【标签数据后执行】
    public String call_SP_SQL_SYNC_HYSTOCK_A(HashMap<String, Object> params);       // 【同步HY库存】
    public String call_SP_SQL_BACKUP_DATA(HashMap<String, Object> params);       // 【备份数据】
}

